package com.ny.dto;

import lombok.Data;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.PositiveOrZero;
import java.math.BigDecimal;
import java.util.Date;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

import io.swagger.annotations.ApiModelProperty;

/**
 * 会员卡信息
 *
 * @author MSI-NB
 * @date 2025-03-08 13:14:38
 */
@Data
public class MemberCardDTO {

    /**
     * 会员卡ID:会员卡ID
     */
    @NotNull(groups = { UpdateGroup.class, DeleteGroup.class }, message = "会员卡ID不能为空")
    @ApiModelProperty(value = "会员卡ID:会员卡ID")
    private Integer cardId;

    /**
     * 会员ID:会员ID
     */
    @NotNull(groups = { CreateGroup.class, UpdateGroup.class }, message = "会员ID不能为空")
    @ApiModelProperty(value = "会员ID:会员ID")
    private Integer memberId;

    /**
     * 会员卡类型:会员卡类型
     */
    @NotBlank(groups = { CreateGroup.class, UpdateGroup.class }, message = "会员卡类型不能为空")
    @Size(max = 50, message = "会员卡类型长度不能超过50")
    @ApiModelProperty(value = "会员卡类型:会员卡类型")
    private String cardType;

    /**
     * 余额:余额
     */
    @NotNull(groups = { CreateGroup.class, UpdateGroup.class }, message = "余额不能为空")
    @PositiveOrZero(message = "余额不能为负数")
    @ApiModelProperty(value = "余额:余额")
    private BigDecimal balance;

    /**
     * 到期日期:到期日期
     */
    @NotNull(groups = { CreateGroup.class, UpdateGroup.class }, message = "到期日期不能为空")
    @ApiModelProperty(value = "到期日期:到期日期")
    private Date expirationDate;

    /**
     * 新到期日期:新到期日期
     */
    @NotNull(groups = { UpdateGroup.class }, message = "新到期日期不能为空")
    @ApiModelProperty(value = "新到期日期:新到期日期")
    private Date newExpirationDate;
}
